package com.wzz.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wzz.entity.ExamRecord;
import com.wzz.mapper.ExamRecordMapper;
import com.wzz.service.TaskService;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: 星川
 * @Date: 2023/07/11/23:19
 * @Description:
 */

@Service
public class TaskServiceImpl extends ServiceImpl<ExamRecordMapper,ExamRecord> implements TaskService {

    @Resource
    private ExamRecordMapper examRecordMapper;

    @Override
    @Scheduled(cron = "0 0/1 * * * ?") //每分钟
    public void autoTask(ExamRecord examRecord) {
//        this.taskService.autoTask(examRecord);
        examRecordMapper.insert(examRecord);
    }
}
